#! /bin/bash
git checkout master
git branch | \
  sed $'s,\x1b\\[[0-9;]*m,,g' | \
  grep -v "master" | \
  xargs -I{} bash -c "git push -d origin {} && git branch -D {}"
